﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div class="pull-right">
  <ul class="pagination ms-pagination no-margin clearfix">
    
    <c:if test="${page.prePage}">
      <li><a href="javascript:void(0);" data-href="${param.url}?${empty param.queryString ? '' : param.queryString}${not empty param.filter ? '&filter=true' : ''}"><i class="glyphicon glyphicon-step-backward"></i></a></li>
      <li><a href="javascript:void(0);" data-href="${param.url}?${empty param.queryString ? '' : param.queryString}${not empty param.filter ? '&filter=true' : ''}${empty param.queryString ? '' : '&'}page=${page.currentPage - 1}"><i class="glyphicon glyphicon-chevron-left"></i></a></li>
    </c:if>
    
    <li><p>${page.currentPage}/${page.totalPage}页，共${page.totals}条记录</p></li>
    
    <c:if test="${page.nextPage}">
      <li><a href="javascript:void(0);" data-href="${param.url}?${empty param.queryString ? '' : param.queryString}${not empty param.filter ? '&filter=true' : ''}${empty param.queryString ? '' : '&'}page=${page.currentPage + 1}"><i class="glyphicon glyphicon-chevron-right"></i></a></li>
      <li><a href="javascript:void(0);" data-href="${param.url}?${empty param.queryString ? '' : param.queryString}${not empty param.filter ? '&filter=true' : ''}${empty param.queryString ? '' : '&'}page=${page.totalPage}"><i class="glyphicon glyphicon-step-forward"></i></a></li>
    </c:if>
    
    <c:if test="${page.totalPage > 1}">
      <li>
        <div class="ajax-paging-jump">
          <span>跳转到</span>
          <input name="page" data-url="${param.url}"
                             data-total = "${page.totalPage}"
                             ${not empty param.filter ? 'data-filter="true"' : ''} 
                             data-querystring="${param.queryString}" />
          <button class="btn btn-default go-btn">Go</button>
        </div>
      </li>
    </c:if>
    
  </ul>
</div>
